﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;

namespace Strom.Core.Utils
{
    public static class Cryptography
    {
        public static string ToMD5(string datas)
        {
            byte[] hash = new MD5Cng().ComputeHash(Encoding.Default.GetBytes(datas));
            return hash.Aggregate("", (current, c) => current + c.ToString("x2"));
        }
    }
}
